<!DOCTYPE html>
<html>
<head>
<title>req_assign</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css"
	href="/codebase/fonts/font_roboto/roboto.css" />
<link rel="stylesheet" type="text/css" href="/codebase/dhtmlx.css" />
<script type="text/javascript" src="/codebase/dhtmlxform.js" />
<script type="text/javascript" src="/codebase/dhtmlxtabbar.js" />
<style>
div#simpleLog {
	height: 200px;
	font-family: Roboto, Arial, Helvetica;
	font-size: 14px;
	color: #404040;
	overflow: auto;
}

div#div_label1{	
	font-family: Roboto, Arial, Helvetica;
	font-size: 14px;
	color: #404040;
	overflow: auto;
	padding-left: 50px;
}

div#div_label2{	
	font-family: Roboto, Arial, Helvetica;
	font-size: 14px;
	color: #404040;
	overflow: auto;
	padding-left: 50px;
}

div#editorObj1 {
	width: 800px;
	height: 150px;
	border: 1px solid #dfdfdf;
}
div#editorObj2 {
	width: 800px;
	height: 150px;
	border: 1px solid #dfdfdf;
}

div#my_tabbar {
	width:900px;
	height: 1200px;
	border: 1px solid #dfdfdf;
}



</style>
<script>
	var myTabbar,myForm, myEditor1,myEditor2,myForm2,form_attach;
	var dhxWins ;
	var customCss = {
		video_bitrate : "validate_magenta",
		video_codec : "validate_orange"
	};
	
	function doOnLoad() {
		//alert("onload req assign");
		var v=document.getElementById("assign_test_id").innerHTML;

			
		if (myForm) {
			myForm.unload();
			myForm = null;
		}
		myForm = new dhtmlXForm("form_req_assign_details");
		//myForm.loadStruct("/common/testmanager/test_modify_detail.xml");		
		myForm.loadStruct("/test/test_modify_detail_onload?test_id="+v);
		//tabbar
		var is_base_info=document.getElementById("is_base_info").innerHTML;
		var is_test_info=document.getElementById("is_test_info").innerHTML;
		var is_team_info=document.getElementById("is_team_info").innerHTML;
		var is_workload_info=document.getElementById("is_workload_info").innerHTML;
		var is_work_log_info=document.getElementById("is_work_log_info").innerHTML;
		
		
		//tabbar

			myTabbar = new dhtmlXTabBar({parent: "my_tabbar"});
			
		//	if(is_base_info=="true"){
				myTabbar.addTab("a1", "基本信息", null, null, true, false);
				myTabbar.tabs("a1").attachURL("/test/test_modify_detail_base_info?test_id="+v);
		//	}

			if(is_test_info=="true"){				 
				myTabbar.addTab("a2", "测试情况", null, null, false, false);
				myTabbar.tabs("a2").attachURL("/test/test_modify_detail_test_info?test_id="+v);
			}
			
			if(is_team_info=="true"){
				
				myTabbar.addTab("a3", "项目成员", null, null, false, false);
				myTabbar.tabs("a3").attachURL("/test/test_modify_detail_team_info?test_id="+v);
			}
			
			if(is_workload_info=="true"){
				 
				myTabbar.addTab("a4", "工作量", null, null, false, false);
				myTabbar.tabs("a4").attachURL("/test/test_modify_detail_workload_info?test_id="+v);
			}
			
			if(is_work_log_info=="true"){
				 
				myTabbar.addTab("a5", "工作日志", null, null, false, false);			
				myTabbar.tabs("a5").attachURL("/test/test_modify_detail_work_log_info?test_id="+v);
			}		
			
			myTabbar.attachEvent("onTabClick", function(id, lastId){
				 var ifr = myTabbar.tabs(id).getFrame();
				 ifr.contentWindow.doOnLoad();
				 
				 /*    if(id=="a1"){
					   myTabbar.tabs("a1").reloadURL();
					   var ifr = myTabbar.tabs("a3").getFrame();
						 ifr.contentWindow.doOnLoad();
				   } 
				   if(id=="a2"){
					   //myTabbar.tabs("a2").reloadURL();
					  
					   //myTabbar.tabs("a2").attachURL("/test/test_modify_detail_test_info?test_id="+v);
					   // get frame
					    var ifr = myTabbar.tabs("a2").getFrame();
					 // access to iframe's function
					    // make sure function is in the iframe's window scope
					    ifr.contentWindow.doOnLoad();
				   } 
				   if(id=="a3"){
					   //myTabbar.tabs("a3").reloadURL();
					   //myTabbar.tabs("a3").attachURL("/test/test_modify_detail_team_info?test_id="+v);
					    var ifr = myTabbar.tabs("a3").getFrame();
						 ifr.contentWindow.doOnLoad();
						 
				   }
				   if(id=="a4"){
					   //myTabbar.tabs("a4").reloadURL();
					   //myTabbar.tabs("a4").attachURL("/test/test_modify_detail_workload_info?test_id="+v);
					   var ifr = myTabbar.tabs("a3").getFrame();
						 ifr.contentWindow.doOnLoad();
				   }
				   if(id=="a5"){
					   //myTabbar.tabs("a5").reloadURL();
					   //myTabbar.tabs("a5").attachURL("/test/test_modify_detail_work_log_info?test_id="+v);
					   var ifr = myTabbar.tabs("a3").getFrame();
						 ifr.contentWindow.doOnLoad();
				   } */
				});
	}
	

</script>
</head>
<body onload="doOnLoad();">
	<div id="assign_test_id" name="assign_test_id" th:text="${test_v}" style="display: none;"></div>
<div id="is_base_info" name="is_base_info" th:text="${is_base_info}" style="display: none;"></div>
<div id="is_test_info" name="is_test_info" th:text="${is_test_info}" style="display: none;"></div>
<div id="is_team_info" name="is_team_info" th:text="${is_team_info}" style="display: none;"></div>
<div id="is_workload_info" name="is_workload_info" th:text="${is_workload_info}" style="display: none;"></div>
<div id="is_work_log_info" name="is_work_log_info" th:text="${is_work_log_info}" style="display: none;"></div>
	<table>
		<tr>
			<td>
				<div id="form_req_assign_details" ></div>
			</td>
		</tr>
	</table>
	<table>
		<tr>
			<td>
				<div id="my_tabbar" ></div>
			</td>
		</tr>
	</table>
	
</body>
</html>